package com.laicunba.service.activity.chanceimpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.laicunba.pojo.ActivityDO;
import com.laicunba.pojo.UserDO;
import com.laicunba.service.ActivityJoinService;
import com.laicunba.service.activity.ActivityChanceService;

/**
 * 月月存套餐20161114
 * 
 * @author why
 *
 */
@Service
public class ActivityYYC20161114ChangeImpl implements ActivityChanceService {
	@Autowired
	private ActivityJoinService activityJoinService;

	@Override
	public String getActivityId() {
		return "20161215";
	}

	@Override
	public boolean hasChance(UserDO userDO, ActivityDO activityDO, String subActId) {
		if (activityJoinService.count(userDO.getId(), activityDO.getId(), subActId) > 0) {
			return false;
		}
		return true;
	}

}
